home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / man / cat.1 / mpeg_encode.1 < prev    next >
Text File  |  1995-07-25  |  22KB  |  463 lines

  1.  
  2.  
  3.  
  4.      MMMMPPPPEEEEGGGG____EEEENNNNCCCCOOOODDDDEEEE((((1111))))   UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((11118888 OOOOccccttttoooobbbbeeeerrrr 1111999999993333))))   MMMMPPPPEEEEGGGG____EEEENNNNCCCCOOOODDDDEEEE((((1111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           mpeg_encode - mpeg-1 video stream encoder
  10.  
  11.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.           mmmmppppeeeegggg____eeeennnnccccooooddddeeee [ ----ssssttttaaaatttt ssssttttaaaatttt____ffffiiiilllleeee ] [ ----qqqquuuuiiiieeeetttt nnnnuuuummmm____sssseeeeccccoooonnnnddddssss ] [ ----
  13.           nnnnoooo____ffffrrrraaaammmmeeee____ssssuuuummmmmmmmaaaarrrryyyy ] [ ----ggggoooopppp ggggoooopppp____nnnnuuuummmm ] [ ----ccccoooommmmbbbbiiiinnnneeee____ggggooooppppssss ] [ ----
  14.           ffffrrrraaaammmmeeeessss ffffiiiirrrrsssstttt____ffffrrrraaaammmmeeee llllaaaasssstttt____ffffrrrraaaammmmeeee ] [ ----ccccoooommmmbbbbiiiinnnneeee____ffffrrrraaaammmmeeeessss ] [ ----nnnniiiicccceeee
  15.           ] [ ----mmmmaaaaxxxx____mmmmaaaacccchhhhiiiinnnneeeessss nnnnuuuummmm____mmmmaaaacccchhhhiiiinnnneeeessss ] [ ----ssssnnnnrrrr ] ppppaaaarrrraaaammmm____ffffiiiilllleeee
  16.  
  17.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  18.           mmmmppppeeeegggg____eeeennnnccccooooddddeeee produces an MPEG-1 video stream.  param_file is
  19.           a parameter file which includes a list of input files and
  20.           other parameters.  The file is described in detail below.
  21.           The -gop, -combine_gops, -frames, and -combine_frames
  22.           options are all exclusive.
  23.  
  24.      OOOOPPPPTTTTIIIIOOOONNNNSSSS
  25.           ----ssssttttaaaatttt ssssttttaaaatttt____ffffiiiilllleeee : causes the encoder to append the
  26.                statistics to the file _s_t_a_t__f_i_l_e.  In any case, the
  27.                statistics are output to stdout.  The statistics use
  28.                the following abbreviations:  bits per block (bpb),
  29.                bits per frame (bpf), seconds per frame (spf), and bits
  30.                per second (bps).
  31.  
  32.           ----qqqquuuuiiiieeeetttt nnnnuuuummmm____sssseeeeccccoooonnnnddddssss : causes the program to not report
  33.                remaining time for at least num_seconds seconds.  A
  34.                negative values tells the program not to report at all.
  35.                0 is the default (reports once after each frame).  Note
  36.                that the time remaining is an estimate and does not
  37.                take into account time to read in frames.
  38.  
  39.           ----nnnnoooo____ffffrrrraaaammmmeeee____ssssuuuummmmmmmmaaaarrrryyyy : prevents the program from printing a
  40.                summary line for each frame
  41.  
  42.           ----ggggoooopppp ggggoooopppp____nnnnuuuummmm : causes the encoder to only encode the
  43.                numbered GOP (first GOP is 0).  The parameter file is
  44.                the same as for normal usage.  The output file will be
  45.                the normal output file with the suffix ".gop.<gop_num>"
  46.                No sequence info is output.
  47.  
  48.           ----ccccoooommmmbbbbiiiinnnneeee____ggggooooppppssss : causes the encoder to simply combine some
  49.                GOP files into a single MPEG stream.  A sequence
  50.                header/ender are inserted.  In this case, the parameter
  51.                file need only contain the YUV_SIZE value, an output
  52.                file, and perhaps a list of input GOP files (see
  53.                below).
  54.  
  55.           ----ffffrrrraaaammmmeeeessss ffffiiiirrrrsssstttt____ffffrrrraaaammmmeeee llllaaaasssstttt____ffffrrrraaaammmmeeee : causes the encoder to only
  56.                encode the frames from first_frame to last_frame,
  57.                inclusive.  The parameter file is the same as for
  58.                normal usage.  The output will be placed in separate
  59.                files, one per frame, with the file names being the
  60.  
  61.  
  62.  
  63.      Page 1                                         (printed 11/26/93)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      MMMMPPPPEEEEGGGG____EEEENNNNCCCCOOOODDDDEEEE((((1111))))   UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((11118888 OOOOccccttttoooobbbbeeeerrrr 1111999999993333))))   MMMMPPPPEEEEGGGG____EEEENNNNCCCCOOOODDDDEEEE((((1111))))
  71.  
  72.  
  73.  
  74.                normal output file with the suffix ".frame.<frame num>"
  75.                No GOP header information is output.  (Thus, the
  76.                parameter file need not include the GOP_SIZE value)
  77.  
  78.           ----ccccoooommmmbbbbiiiinnnneeee____ffffrrrraaaammmmeeeessss : causes the encoder to simply combine some
  79.                frames into a single MPEG stream.  Sequence and GOP
  80.                headers are inserted appropriately.  In this case, the
  81.                parameter file need only contain the YUV_SIZE value,
  82.                the GOP_SIZE value, an output file, and perhaps a list
  83.                of frame files (see below).
  84.  
  85.           ----nnnniiiicccceeee : causes the program to run any remote processes
  86.                'nicely.'  This is only relevant if the program is
  87.                using parallel encoding.  (see 'man nice.')
  88.  
  89.           ----mmmmaaaaxxxx____mmmmaaaacccchhhhiiiinnnneeeessss nnnnuuuummmm____mmmmaaaacccchhhhiiiinnnneeeessss : causes the program to use no
  90.                more than num_machines machines as slaves for use in
  91.                parallel encoding.
  92.  
  93.           ----ssssnnnnrrrr : print the signal-to-noise ratio.  Prints SNR (Y U V)
  94.                and peak SNR (Y U V) for each frame.  In summary,
  95.                prints averages of luminance only (Y).  SNR is defined
  96.                as 10*log(variance of original/variance of error).
  97.                Peak SNR is defined as 20*log(255/RMSE).  Note that the
  98.                encoder will run a little slower if you want it to
  99.                print the SNR.
  100.  
  101.  
  102.      PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRR FFFFIIIILLLLEEEE
  103.           The parameter file MUST contain the following lines (except
  104.           when using the -combine_gops or -combine_frames options):
  105.  
  106.                PATTERN <pattern>
  107.  
  108.                OUTPUT <output file>
  109.  
  110.                INPUT_DIR <directory>
  111.                     all input files must reside in this directory.  If
  112.                     you want to refer to the current directory, use
  113.                     '.' (an empty INPUT_DIR value would refer to the
  114.                     root directory).
  115.  
  116.                INPUT
  117.                     This line must be followed by a list of the input
  118.                     files (in display order) and then the line
  119.                          END_INPUT
  120.                     There are three types of lines between INPUT and
  121.                     END_INPUT.  First, a line may simply be the name
  122.                     of an input file.  Secondly, the line may be of
  123.                     the form
  124.                          <single_star_expr> [x-y]
  125.                     single_star_expr can have a single '*' in it.  It
  126.  
  127.  
  128.  
  129.      Page 2                                         (printed 11/26/93)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      MMMMPPPPEEEEGGGG____EEEENNNNCCCCOOOODDDDEEEE((((1111))))   UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((11118888 OOOOccccttttoooobbbbeeeerrrr 1111999999993333))))   MMMMPPPPEEEEGGGG____EEEENNNNCCCCOOOODDDDEEEE((((1111))))
  137.  
  138.  
  139.  
  140.                     is replaced by all the numbers between x and y
  141.                     inclusive.  So, for example, the line
  142.                          tennis*.ppm [12-15]
  143.                     is replaced by tennis12.ppm, tennis13.ppm,
  144.                     tennis14.ppm, tennis15.ppm.  Uniform zero-padding
  145.                     occurs, as well.  For example, the line
  146.                          football.*.ppm [001-130]
  147.                     is replaced by football.001.ppm, football.002.ppm,
  148.                     ..., football.009.ppm, football.010.ppm, ...,
  149.                     football.130.ppm.  The third type of line is:
  150.                          <single_star_expr> [x-y+s]
  151.                     Where the line is treated exactly as above, except
  152.                     that we skip by s.  Thus, the line
  153.                          football.*.ppm [001-130+4]
  154.                     is replaced by football.001.ppm, football.005.ppm,
  155.                     football.009.ppm, football.013.ppm, etc.
  156.  
  157.                BASE_FILE_FORMAT <YUV or PPM or PNM>
  158.                     All the input files must be converted to YUV, PNM
  159.                     or PPM format.  This line specifies which of the
  160.                     three formats (actually PPM is a subset of PNM).
  161.                     In the YUV format, the U and V components are
  162.                     subsampled 4:1.  The reason for having a separate
  163.                     PPM option is for simplicity.  If your files are
  164.                     RAWBITS ppm files, then use the PPM option rather
  165.                     than the PNM.  Also, depending on the system, file
  166.                     reads will go much faster with the PPM option (as
  167.                     opposed to PNM).
  168.  
  169.                INPUT_CONVERT <conversion command>
  170.                     You must specify how to convert a file to the base
  171.                     file format.  In the conversion command, each '*'
  172.                     is replaced by the filename (the items listed
  173.                     between INPUT and END_INPUT).  If no conversion is
  174.                     necessary, then you would just say:
  175.                          INPUT_CONVERT *
  176.                     If you had a bunch of gif files, you might say:
  177.                          INPUT_CONVERT giftoppm *
  178.                     If you have a bunch of separate a.Y, a.U, and a.V
  179.                     files, then you might say:
  180.                          INPUT_CONVERT cat *.Y *.U *.V
  181.  
  182.                GOP_SIZE <n>
  183.                     n is roughly the number of frames in a Group of
  184.                     Pictures (roughly because a GOP must begin with an
  185.                     I-frame)
  186.  
  187.                SLICES_PER_FRAME <n>
  188.                     n is roughly the number of slices per frame.
  189.                     Note, at least one MPEG player may complain if
  190.                     slices do not start at the left side of an image.
  191.                     To ensure this does not happen, make sure the
  192.  
  193.  
  194.  
  195.      Page 3                                         (printed 11/26/93)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      MMMMPPPPEEEEGGGG____EEEENNNNCCCCOOOODDDDEEEE((((1111))))   UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((11118888 OOOOccccttttoooobbbbeeeerrrr 1111999999993333))))   MMMMPPPPEEEEGGGG____EEEENNNNCCCCOOOODDDDEEEE((((1111))))
  203.  
  204.  
  205.  
  206.                     number of rows is divisible by SLICES_PER_FRAME.
  207.  
  208.                PIXEL <FULL or HALF>
  209.                     use half-pixel motion vectors, or only full-pixel
  210.                     ones
  211.  
  212.                RANGE <n>
  213.                     use a search range of +/- n pixels
  214.  
  215.                PSEARCH_ALG <algorithm>
  216.                     algorithm must be one of {EXHAUSTIVE, TWOLEVEL,
  217.                     SUBSAMPLE, LOGARITHMIC}.  Tells what kind of
  218.                     search procedure should be used for P-frames.
  219.                     Exhaustive gives the best compression, but
  220.                     logarithmic is the fastest.  You select the
  221.                     desired combination of speed and compression.
  222.                     TWOLEVEL is an exhaustive full-pixel search,
  223.                     followed by a local half- pixel search around the
  224.                     best full-pixel vector (the PIXEL option is
  225.                     ignored for this search algorithm).
  226.  
  227.                BSEARCH_ALG <algorithm>
  228.                     algorithm must be one of {SIMPLE, CROSS2,
  229.                     EXHAUSTIVE}.  Tells what kind of search procedure
  230.                     should be used for B-frames.  Simple means find
  231.                     best forward and backward vectors, then
  232.                     interpolate.  Cross2 means find those two vectors,
  233.                     then see what backward vector best matches the
  234.                     best forward vector, and vice versa.  Exhaustive
  235.                     does an n-squared search and is EXTREMELY slow in
  236.                     relation to the others (Cross2 is about twice as
  237.                     slow as Simple).
  238.  
  239.                IQSCALE <n>
  240.                     use n as the qscale for I-frames
  241.  
  242.                PQSCALE <n>
  243.                     use n as the qscale for P-frames
  244.  
  245.                BQSCALE <n>
  246.                     use n as the qscale for B-frames
  247.  
  248.                REFERENCE_FRAME <ORIGINAL or DECODED>
  249.                     If ORIGINAL is specified, then the original images
  250.                     are used when computing motion vectors.  To be
  251.                     more accurate, use DECODED, in which the decoded
  252.                     images are used.  This should increase the quality
  253.                     of the image, but will take a bit longer to
  254.                     encode.
  255.                The following lines are optional:
  256.  
  257.                     FORCE_I_ALIGN
  258.  
  259.  
  260.  
  261.      Page 4                                         (printed 11/26/93)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      MMMMPPPPEEEEGGGG____EEEENNNNCCCCOOOODDDDEEEE((((1111))))   UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((11118888 OOOOccccttttoooobbbbeeeerrrr 1111999999993333))))   MMMMPPPPEEEEGGGG____EEEENNNNCCCCOOOODDDDEEEE((((1111))))
  269.  
  270.  
  271.  
  272.                          This option is only relevant for parallel
  273.                          execution (see below).  It forces each
  274.                          processor to encode a block of N frames,
  275.                          where N must be a multiple of the pattern
  276.                          length.  Since the first frame in any pattern
  277.                          is an I-frame, this forces each block encoded
  278.                          by a processor to begin with an I-frame.
  279.                     foo
  280.  
  281.  
  282.      NNNNOOOOTTTTEEEESSSS
  283.           If the BASE_FILE_FORMAT is YUV, then the parameter file must
  284.           contain:
  285.                YUV_SIZE <w>x<h>
  286.           where w = width, h = height (in pixels) of image
  287.  
  288.           If the -combine-gops option is used, then only the YUV_SIZE
  289.           and OUTPUT values need be specified in the parameter file.
  290.           In addition, the parameter file may specify input GOP files
  291.           in the same manner as normal input files -- except instead
  292.           of using INPUT_DIR, INPUT, and END_INPUT, use GOP_INPUT_DIR,
  293.           GOP_INPUT, and GOP_END_INPUT.  If no input GOP files are
  294.           specified, then the default is to use the output file name
  295.           with suffix ".gop.<gop_num>" starting from 0 as the input
  296.           files.
  297.  
  298.           If the -combine-frames option is used, then only the
  299.           YUV_SIZE, GOP_SIZE, and OUTPUT values need be specified in
  300.           the parameter file.  In addition, the parameter file may
  301.           specify input frame files in the same manner as normal input
  302.           files -- except instead of using INPUT_DIR, INPUT, and
  303.           END_INPUT, use FRAME_INPUT_DIR, FRAME_INPUT, and
  304.           FRAME_END_INPUT.  If no input frame files are specified,
  305.           then the default is to use the output file name with suffix
  306.           ".frame.<frame_num>" starting from 0 as the input files.
  307.  
  308.           Any number of spaces and tabs may come between each option
  309.           and value.  Lines beginning with '#' are ignored.  Any other
  310.           lines are ignored except for those between INPUT and
  311.           END_INPUT.  This allows you to use the same parameter file
  312.           for normal usage and for -combine_gops and -combine_frames.
  313.  
  314.           The encoder is case-sensitive so, except for file names and
  315.           directories, everything should be in upper case.
  316.  
  317.           The lines may appear in any order, except the following
  318.           exceptions.  INPUT must appear before END_INPUT  (also,
  319.           GOP_INPUT before GOP_END_INPUT and FRAME_INPUT before
  320.           FRAME_END_INPUT).  All lines between INPUT and END_INPUT
  321.           must be the frames in play order.
  322.  
  323.  
  324.  
  325.  
  326.  
  327.      Page 5                                         (printed 11/26/93)
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.      MMMMPPPPEEEEGGGG____EEEENNNNCCCCOOOODDDDEEEE((((1111))))   UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((11118888 OOOOccccttttoooobbbbeeeerrrr 1111999999993333))))   MMMMPPPPEEEEGGGG____EEEENNNNCCCCOOOODDDDEEEE((((1111))))
  335.  
  336.  
  337.  
  338.      PPPPAAAARRRRAAAALLLLLLLLEEEELLLL OOOOPPPPEEEERRRRAAAATTTTIIIIOOOONNNN
  339.           The encoder may be run on multiple machines at once.  To do
  340.           so, add a line "PARALLEL" in the parameter file, followed by
  341.           a listing, one machine per line, then "END_PARALLEL".  Each
  342.           of the lines should be in one of two forms.  If the machine
  343.           has access to the file server, then the line should be:
  344.  
  345.                <machine> <user> <executable>
  346.  
  347.           The executable is normally mpeg_encode (you may need to give
  348.           the complete path if you've built for different
  349.           architectures).  If the machine is a remote machine, then
  350.           the line should be:
  351.  
  352.                REMOTE <machine> <user> <executable> <parameter file>
  353.  
  354.           Full paths should generally be used when describing
  355.           executables and parameter files.  This INCLUDES the
  356.           parameter file given as an argument to the original call to
  357.           mpeg_encode.  Also, .rhosts files on the appropriate
  358.           machines should have the appropriate information.
  359.  
  360.           The encoder will use the original machine for the master and
  361.           I/O server processes, and uses the listed machines as slaves
  362.           to do the computation.
  363.  
  364.           Optional lines are
  365.  
  366.           RSH <remote shell command>
  367.                The encoder uses the remote shell command to start
  368.                processes on other machines.  The default command is
  369.                'rsh.'  If your machine supports a different command,
  370.                specify it here.
  371.  
  372.           PARALLEL_TEST_FRAMES <n>
  373.                n is the number of frames to encode initially on each
  374.                processor
  375.  
  376.           PARALLEL_TIME_CHUNKS <t>
  377.                subsequently, each slave processor will be asked to
  378.                encode for approximately t seconds.  Smaller values of
  379.                <t> increase communication, but improve load balancing.
  380.  
  381.                The default values for these two options are n = 3
  382.                     frames and t = 30 seconds.
  383.  
  384.           PARALLEL_PERFECT
  385.                If this line is present, then scheduling is done on the
  386.                assumption that work distribution will be perfectly
  387.                even -- meaning that each machine is about the same
  388.                speed.  The frames will simply be divided up evenly
  389.                between the processors.  This has the advantage of very
  390.  
  391.  
  392.  
  393.      Page 6                                         (printed 11/26/93)
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.      MMMMPPPPEEEEGGGG____EEEENNNNCCCCOOOODDDDEEEE((((1111))))   UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((11118888 OOOOccccttttoooobbbbeeeerrrr 1111999999993333))))   MMMMPPPPEEEEGGGG____EEEENNNNCCCCOOOODDDDEEEE((((1111))))
  401.  
  402.  
  403.  
  404.                minimal scheduling overhead, but is obviously wrong if
  405.                machines have varying speeds, or if the network load
  406.                makes performance uneven.
  407.           Please note that the parallel code has not been well-tested
  408.           and is not very fault-tolerant (if a slave process goes
  409.           down, nothing works).  Future versions of the encoder will
  410.           support parallel execution better.
  411.  
  412.  
  413.      AAAAUUUUTTTTHHHHOOOORRRRSSSS
  414.           Kevin Gong - University of California, Berkeley,
  415.                keving@cs.berkeley.edu
  416.  
  417.           Ketan Patel - University of California, Berkeley,
  418.                kpatel@cs.berkeley.edu
  419.  
  420.           Dan Wallach - University of California, Berkeley,
  421.                dwallach@cs.berkeley.edu
  422.  
  423.      BBBBUUUUGGGGSSSS
  424.           No known bugs.
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.      Page 7                                         (printed 11/26/93)
  460.  
  461.  
  462.  
  463.